namespace BSDS.Core.Infrastructure.Configuration
{
    public class BsdsConfiguration
    {
        public IBingKey BingKey { get; private set; }
        public string TempFolder { get; private set; }
        public bool DeleteTempFolderOnExit { get; private set; }
        public bool RequireExclusiveFolderAccess { get; private set; }

        public BsdsConfiguration(string bingKeyInfo, string tempFolder, bool deleteTempFolderOnExit, bool requireExclusiveFolderAccess)
        {
            if (System.IO.File.Exists(bingKeyInfo))
                BingKey = new BingKeyLazyLoader(bingKeyInfo);
            else
                BingKey = new BingKey() { Value = bingKeyInfo };
            TempFolder = tempFolder;
            DeleteTempFolderOnExit = deleteTempFolderOnExit;
            RequireExclusiveFolderAccess = requireExclusiveFolderAccess;
       }
    }
}